<template>
  <el-container class="main_con"></el-container>
</template>

<script>
import {getLoginType} from '@/utils/auth';
import {mapGetters} from 'vuex';

export default {
  name: 'dashboard',
  data() {
    return {};
  },
  computed: {
    ...mapGetters(['addRoutes'])
  },
  created() {
    let login_type = getLoginType(2);
    console.log(this.addRoutes[0].redirect)
    if(this.addRoutes&&this.addRoutes[0]){
      this.$router.push(this.addRoutes[0].redirect)
    }else{
      // 根据登陆场景切换导航默认地址
      switch (login_type) {
      
        case 'mall':
          this.$router.push('/mall/index');
          break;
      
        case 'shop':
          this.$router.push('/shopHome/index');
          break;
        default:
          //empty
          break;
      }
    }
      // this.$router.push('/saas/index');

  }
};
</script>

<style lang="scss" scoped></style>
